<template>
<div>
    <label>金额:</label>
    <input type="number" v-model="money" />

    <p>格式化金额:{{ FMoney }}</p>
</div>
</template>


<script setup>
import {ref, computed} from 'vue'

const money = ref(0)

const FMoney = computed(
    () => {
        return '￥' + money.value.toFixed(2)
    }
)


</script>


<style scoped>

</style>